# 创建一个  令牌的 函数
import requests


def get_token():
    resp = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                         headers={"Content-Type": "application/json"},
                         json={"mobile": "13800000002", "password": "123456"})
    req = resp.json().get("data")
    return {"Authorization": req}


if __name__ == '__main__':
    i = get_token()
    print(i)
